/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.io.Serializable;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

/**
 *
 * @author AdminNUS
 */
@Entity
public class Advertisement implements Serializable {

 
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    private String tags;
    private String filePath;
    private String description;
    private String link;
    private boolean isSubscription;
    private boolean isImpression;
    private Double biddingPrice;
    private boolean isActivated;
    private Integer maxClicks;
    private Integer maxImpression;
    @ManyToOne
    private Stakeholder stakeholder;
    @OneToMany(cascade = {CascadeType.PERSIST})
    private List<AdvertisementStatistics> AdvertisementStatistics;
    

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Advertisement)) {
            return false;
        }
        Advertisement other = (Advertisement) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entity.Advertisment[ id=" + id + " ]";
    }

    /**
     * @return the tags
     */
    

    /**
     * @return the filePath
     */
    public String getFilePath() {
        return filePath;
    }

    /**
     * @param filePath the filePath to set
     */
    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * @param description the description to set
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * @return the link
     */
    public String getLink() {
        return link;
    }

    /**
     * @param link the link to set
     */
    public void setLink(String link) {
        this.link = link;
    }

    /**
     * @return the isSubscription
     */
    public boolean isIsSubscription() {
        return isSubscription;
    }

    /**
     * @param isSubscription the isSubscription to set
     */
    public void setIsSubscription(boolean isSubscription) {
        this.isSubscription = isSubscription;
    }

    /**
     * @return the isImpression
     */
    public boolean isIsImpression() {
        return isImpression;
    }

    /**
     * @param isImpression the isImpression to set
     */
    public void setIsImpression(boolean isImpression) {
        this.isImpression = isImpression;
    }

    /**
     * @return the biddingPrice
     */
    public Double getBiddingPrice() {
        return biddingPrice;
    }

    /**
     * @param biddingPrice the biddingPrice to set
     */
    public void setBiddingPrice(Double biddingPrice) {
        this.biddingPrice = biddingPrice;
    }

    /**
     * @return the isActivated
     */
    public boolean isIsActivated() {
        return isActivated;
    }

    /**
     * @param isActivated the isActivated to set
     */
    public void setIsActivated(boolean isActivated) {
        this.isActivated = isActivated;
    }

    /**
     * @return the maxClicks
     */
    public Integer getMaxClicks() {
        return maxClicks;
    }

    /**
     * @param maxClicks the maxClicks to set
     */
    public void setMaxClicks(Integer maxClicks) {
        this.maxClicks = maxClicks;
    }

    /**
     * @return the stakeholder
     */
    public Stakeholder getStakeholder() {
        return stakeholder;
    }

    /**
     * @param stakeholder the stakeholder to set
     */
    public void setStakeholder(Stakeholder stakeholder) {
        this.stakeholder = stakeholder;
    }

    /**
     * @return the AdvertismentStatistics
     */
    
    /**
     * @return the maxImpression
     */
    public Integer getMaxImpression() {
        return maxImpression;
    }

    /**
     * @param maxImpression the maxImpression to set
     */
    public void setMaxImpression(Integer maxImpression) {
        this.maxImpression = maxImpression;
    }

    /**
     * @return the AdvertisementStatistics
     */
    public List<AdvertisementStatistics> getAdvertisementStatistics() {
        return AdvertisementStatistics;
    }

    /**
     * @param AdvertisementStatistics the AdvertisementStatistics to set
     */
    public void setAdvertisementStatistics(List<AdvertisementStatistics> AdvertisementStatistics) {
        this.AdvertisementStatistics = AdvertisementStatistics;
    }

    /**
     * @return the tags
     */
    public String getTags() {
        return tags;
    }

    /**
     * @param tags the tags to set
     */
    public void setTags(String tags) {
        this.tags = tags;
    }
    
}
